(C) 1996 AROS - The Amiga Replacement OS


NAME
#include <proto/utility.h>
QUAD SDivMod32()
SYNOPSIS
LONG dividend
LONG divisor

LOCATION
In UtilityBase at offset 25
FUNCTION
Calculates the 32-bit signed division of dividend by divisor. That is dividend / divisor. Will return both the quotient and the remainder.

INPUTS
dividend
The number to divide.
divisor
The to divide by.
RESULT
For m68k assembly programmers: D0: quotient D1: remainder Others: The quotient is returned in the high 32 bits of the result. The remainder in the low 32 bits.

NOTES
The utility.library math functions are unlike all other utility functions in that they don't require the library base to be loaded in register A6, and they also save the values of the address registers A0/A1.

This function is mainly to support assembly programers, and is probably of limited use to higher-level language programmers.

EXAMPLE
BUGS
It is very hard for a C programmer to obtain the value of the remainder. In fact, its pretty near impossible.

SEE ALSO
SMult32(), SMult64(), UDivMod32(), UMult32(), UMult64()
INTERNALS
This may be handled by code in config/$(KERNEL).

HISTORY
03.02.1997 ldp
machine.i in local directory
02.02.1997 iaint
Special assembly support code for m68k/Amiga compatibility